package admin

import (
	"github.com/gogf/gf/v2/frame/g"
	"learn-goframe/api/v1/common"
	"learn-goframe/internal/repository/xtcloud-file/entity"
)

type SolutionListReq struct {
	g.Meta `path:"/solution/list" tags:"Admin/Solution" method:"get" summary:"解决方案列表"`

	common.PaginationReq

	Status int `json:"status" d:"0" v:"required|in:0,1,2,3,4"  in:"" dc:"状态"`

	SolutionName string `json:"solutionName" d:"" dc:"方案名称"`
}

type SolutionListRes struct {
	common.PaginationRes

	List []*entity.ProjectSolution `json:"list" description:"列表"`
}

type SolutionUpdateReq struct {
	g.Meta `path:"/solution/update" tags:"Admin/Solution" method:"post" summary:"修改解决方案"`

	Id string `json:"id"  dc:"方案id" v:"required#方案id不能为空"`

	OrgName           string `json:"orgName"           dc:"企业名称" v:"required#企业名称不能为空"`
	OrgLicenseImgUrl  string `json:"orgLicenseImgUrl"  dc:"企业营业执照" v:"required|url#企业营业执照不能为空|url格式不正确"`
	SolutionName      string `json:"solutionName"      dc:"方案名称" v:"required#方案名称不能为空"`
	SolutionImgUrl    string `json:"solutionImgUrl"    dc:"方案图片" v:"required|url#方案图片不能为空|url格式不正确"`
	SolutionSummarize string `json:"solutionSummarize" dc:"方案概述" v:"required#方案概述不能为空"`
	SolutionFileUrl   string `json:"solutionFileUrl"   dc:"方案文件" v:"required|url#方案文件不能为空|url格式不正确"`
	ContactMobile     string `json:"contactMobile"     dc:"手机号" v:"required|phone-loose#手机号不能为空|手机号格式不正确"`

	CategoryId       string `json:"categoryId" dc:"分类id" v:"required#分类id不能为空"`
	CategoryParentId string `json:"categoryParentId" dc:"分类父id" v:"required#分类父id不能为空"`
}

type SolutionUpdateRes struct {
	Id string `json:"id" dc:"方案id"`
}

type SolutionCheckReq struct {
	g.Meta `path:"/solution/check" tags:"Admin/Solution" method:"post" summary:"审核解决方案"`

	Id     string `json:"id" dc:"方案id" v:"required#方案id不能为空"`
	Status int    `json:"status" v:"required|in:2,3" dc:"状态，2=通过，3=驳回"`

	CheckRemark string `json:"checkRemark" d:"" dc:"备注，驳回原因"`
	CheckUserId string `json:"checkUserId" d:"" dc:"审核人id"`
}

type SolutionCheckRes struct {
}

type SolutionDeleteReq struct {
	g.Meta `path:"/solution/delete" tags:"Admin/Solution" method:"post" summary:"删除解决方案"`

	Id string `json:"id" dc:"方案id" v:"required#方案id不能为空"`
}

type SolutionDeleteRes struct {
}
